package cn.ytzb.controller;

import cn.ytzb.pojo.Admin;
import cn.ytzb.service.AdminService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/admin")
public class AdminController {
     @Resource
    private AdminService adminService;
     @GetMapping("/find")
    public List<Admin> find(){

         return adminService.findAll();
     }
}
